from processing.model.component import Component
from processing.model.accees_point import EnterPoint, ExitPoint


class FlowComponent(Component):
    
    def __init__(self):
        Component.__init__(self)
        self.__enter = EnterPoint()
        self.__exit = ExitPoint()
  
    def on_added(self):
        self.add(self.__enter)
        self.add(self.__exit)

    def update(self):
        self.__enter.update()
        self.__exit.update()
        
    def draw(self):
        self.__enter.draw()
        self.__exit.draw()
        
    def enter_position(self, x, y):
        self.enter.x = x
        self.enter.y = y
        
    def exit_position(self, x, y):
        self.exit.x = x
        self.exit.y = y
        
    @property
    def enter(self):
        return self.__enter
        
    @property
    def exit(self):
        return self.__exit










     